Automated Test Generation for Object-Oriented Programs with Multiple Targets
نویسندگان
چکیده
Software testing is costly. In particular, testing object-oriented programs is complicated and burdensome because of the difficulty in generating method sequences for creating objects and changing their states appropriately to achieve high branch coverage. Automated test generation based on static and dynamic analysis is not only an effective approach to saving time and reducing the burden of testing, but also an efficient way to find bugs. Seeker is an implementation for automated test generation that involves the generation of method sequences using static and dynamic analysis. However, when we want to change some values of variables to increase the branch coverage, the system fails to generate method sequences to achieve the desired states of objects with multiple targets (meaning fields or variables). In this paper, we extend the functionalities of the system for automated test generation so that it can handle multiple targets to cover. Our approach identifies all targets involved in uncovered branches and evaluates method sequences according to a fitness function, while applying a search strategy to suppress combinatorial explosion. The experimental results with several open source projects show that our extension achieves higher branch coverage than the original system and the effectiveness of the extension tends to vary according to the specific features of the projects.
منابع مشابه
Automated Test Case Generation Considering Object States in Object-Oriented Programming
Testing for object-oriented programs is complicated and burdensome. One reason is the difficulty associated with generating method sequences that create instances and change object states to achieve high branch coverage. Automated test generation using mixed static and dynamic analysis is not only an effective approach to save time and reduce the burden of testing, but also an efficient way to ...
متن کاملAutomated Evolutionary Test Data Generation with Domain Reduction for Aspect-Oriented Programs
Aspect-Oriented Programming is an emerging technique that helps improve separation of concerns in software systems. It has received a great deal of recent interest. However, algorithms and empirical results for testing of aspect-oriented programs are lagging some way behind this upsurge in interest. To date, there are few published approaches to automated test data generation for aspectoriented...
متن کاملSequential Pattern Mining Based Test Case Regeneration
Automated test generation for object-oriented programs is an essential and yet a difficult task. Many automated test generation approaches produce test cases entirely from the program under test, without considering useful information from already created test cases. This paper presents an approach to regenerate test cases via exploiting frequently-used method call sequences from test repositor...
متن کاملA Complete Automation of Unit Testing for Java Programs
Program testing is expensive and laborintensive, often consuming more than half of the total development costs, and yet it is frequently not done well and the results are not always satisfactory. However, testing is the primary method to ensure that programs comply with requirements. We describe our on-going project that attempts to completely automate unit testing of objectoriented programs. O...
متن کاملA Framework for Testing Object Oriented Software Using Formal Speci cations
In this paper we develop a framework for semi-automated generation of test cases for object oriented programs from formal speci-cations. We use Object-Z as the formal speciication language. We have designed and prototyped a test system called OZTEST. It understands the characteristics of object-oriented speciications including inheritance. OZTEST maps the speciication to a corresponding impleme...
متن کامل